package com.batsoft.trade.entity;

import com.batsoft.trade.model.transaction.ContractType;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * @author <a href="mailto:hellohesir@gmail.com">Mr_He</a>
 * 2019/8/20 13:53
 * 委托单数据
 */
@Getter
@Setter
public class OrderData {

    private String orderNum;

    private Long userId;

    // 币种
    private String coinCode;

    // 委托价
    private BigDecimal price;

    // 剩余张数
    private BigDecimal count;

    // 委托张数
    private BigDecimal countAll;

    //操作类型
    private Integer handleType; // ContractType

    //面值
    private BigDecimal faceValue;

    // 手续费率 小数
    private BigDecimal feeRatio;

    // 撮合总值
    private BigDecimal totalMoney;

    public ContractType getHandleType() {
        return ContractType.getByValue(handleType);
    }
}
